<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.ResultSet" %>
<%@page import="java.text.DecimalFormat" %>

<%
DecimalFormat formatter2 = new DecimalFormat("#####0.00");
if((Float)request.getAttribute("puntuacio") > 0) {%>
    <div> Puntuacio: <span><%=formatter2.format(request.getAttribute("puntuacio")) %></span></div>
<% } else { %>
    <div>No ha estat puntuat aquest producte</div>
<% } %>
<% if((Boolean)session.getAttribute("isLogged")) { %>
    <select id="menupunt">
        <option>---</option>
    <% for (int i = 1; i <= 10; i++ ) { %>
        <% if (request.getAttribute("puntEscollit") != null && (Integer)request.getAttribute("puntEscollit") == i) { %>
            <option value="<%=i %>" selected="selected"> <%=i %> </option>
        <% } else { %>
            <option value="<%=i %>"> <%=i %> </option>
        <% } %>
    <% } %>
    </select>
<% } %>

